Skip to content

test(ci): run the workspace tests on Windows - #87

Merged
N4M3Z merged 5 commits into
mainfrom
change/rune-runs-on-windows
Nov 19, 2026
Merged

N4M3Z merged 5 commits into
mainfrom
change/rune-runs-on-windows

Conversation

@runewright

@runewright runewright Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Draft for change/rune-runs-on-windows: the session agent fills this body before rune sign open.

Plan

Why this shape, one or two sentences.

Changes

  • Fill in: verb-first, file-anchored claims the diff upholds.

Testing

  • Fill in: the command run and its outcome.

Release Notes

  • N/A

Note

Run the workspace test suite on Windows

  • Adds a shared path layer in src/folders.rs: folders::canonicalize strips Windows verbatim path prefixes when a plain spelling is valid, folders::join splits slash-delimited strings into native components, and home/cache/data/state lookups replace the dirs crate
  • Adds slash_text/slash_lossy formatters in src/manifest/mod.rs and migrates paths used in manifests, findings, and validation output to / separators on Windows
  • Fixes Windows-only runtime behavior: nonce generation uses getrandom::fill instead of /dev/urandom in src/cli/sign/seal.rs, and project-scope target keys handle \ and : in src/target/mod.rs
  • Updates the CI Windows job in .github/workflows/test.yaml to install jj and mdschema and run the full locked workspace test suite; scripts/install-tools gains ZIP extraction, .exe names, and MSYS/MINGW detection, and build.rs requests an 8 MiB stack for Windows binaries
  • Marks Unix-dependent tests as ignored on Windows (shell scripts, executable bit, python3); test isolation sets USERPROFILE, APPDATA, and LOCALAPPDATA under the scratch home on Windows
  • Risk: canonicalized path strings on Windows now lack the \\?\\ prefix, and manifest/finding path text changes to / separators — consumers comparing raw canonical or display paths (e.g. session/exclude.rs glob handling, manifest/source_snapshot.rs validation) are migrated in-tree but out-of-tree comparisons of stored path text may need adjustment

Macroscope summarized 8237437.

Claude Fable 5.2 (claude-fable-5-2) and others added 5 commits November 18, 2026 16:03
Windows reserves 1 MB of stack for the main thread. Linux and macOS
give it 8 MB. A debug build of rune overflowed 1 MB while it built its
command tree, before any command ran: `rune --version` ended with
"thread 'main' has overflowed its stack". Every integration test runs
the debug binary, so every one of them failed on Windows.

build.rs now passes /STACK:8388608 to the MSVC linker for the rune
binary, and --stack to the GNU linker. Other platforms are unchanged.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
rune ignored HOME on Windows. `dirs` asks the shell for its known
folders and reads no environment variable, so nothing could point rune
at another home. The tests isolate themselves through HOME: on Windows
they would have rewritten the developer's own ~/.claude and ~/.codex.
src/folders.rs now answers for the home, cache, data, and state
folders. On Windows a HOME that holds an absolute path is the home, and
the cache and data folders sit under it. Unix is unchanged.

fs::canonicalize answers `\\?\C:\repo` on Windows. In that form `/` is
not a separator, so `root.join("rules/Style.md")` names no file, and
the path does not equal the same folder written `C:\repo`.
folders::canonicalize and the Canonical trait answer `C:\repo`.
folders::join joins a path written with `/` one part at a time, so a
printed path has one kind of separator. rune-docs carries its own copy
of canonicalize in support.rs, as it does for its other helpers.

A relative path became text with `\` between its parts. The bundle and
source snapshot code refuses a `\` as ambiguous, so `rune install`
refused every skill. manifest::slash_text and slash_lossy write `/` on
every platform, and provenance_path uses them.

tests/support also points USERPROFILE, APPDATA, and LOCALAPPDATA at
the scratch HOME on Windows, for the tools a test starts.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
…work

Every `dirs::home_dir`, `cache_dir`, `data_dir`, and `state_dir`
becomes the same call on `folders`. Every `fs::canonicalize(x)` becomes
`folders::canonicalize(x)`, and every `x.canonicalize()` becomes
`x.canonical()`.

A relative path that is a key goes through manifest::slash_lossy.
Before this, on Windows:

- `rune install` wrote manifest keys such as `SmokeSkill\Notes.md`,
  and `rune doctor` reported every deployed file as an orphan.
- The skill readiness check found no manifest claim for any skill.
- A session exclusion never matched a working folder, so an excluded
  session was captured.
- The project-scope target key kept `\` and the drive colon. It was an
  absolute path, and joining it dropped the home folder.
- The Codex skill migration, the source walk, the skill layer report,
  drift, the provenance scan, validate, and init built keys with `\`.

`rune sign` read /dev/urandom for the seal nonce. Windows has no such
file and now uses getrandom, which was already in the dependency tree.

A printed path has one kind of separator, the `~/` form is written
with `/`, and the usage line says `rune`, not `rune.exe`.

The tests that compared a path as text now build it the way rune
prints it, and two fixtures that wrote a Windows path into a TOML or a
JSON string now escape it. Each gives the same text on Unix.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
146 tests cannot run on Windows: they start a shell script as a
program, need the executable bit, signal a process group, or run
python3 or make. Each now has
`#[cfg_attr(windows, ignore = "<reason>")]`. It runs on Linux and
macOS as before, and a Windows run reports it as ignored.

61 of them are hook tests. rune hooks assume /bin/sh, the executable
bit, and paths that start with `/`, and are not supported on Windows.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
The Windows job compiled rune and tested rune-docs, so it could not
see that `rune install` did not work there. It now installs jj and
mdschema, puts the tools of Git for Windows first on the PATH, and
runs `cargo test --locked --workspace`.

scripts/install-tools installs jj and mdschema under Git Bash: it
knows the Windows archive names, unzips them, and installs the .exe.
scripts/tool-versions has the two digests.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@github-actions github-actions Bot added size:xlarge auto: changed-lines bucket area:workflows auto: CI and automation under .github labels Nov 18, 2026
@runeseer

runeseer Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

review/correctness round 1 started on 8237437d at ledger generation 1.

@runeseer

runeseer Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @Runewright[bot]'s task in 4m 14s —— View job


Correctness review

  • Read the ledger and the other lanes' findings (none recorded for this head)
  • Review c235996..8237437 against origin/main
  • Write the verdict, findings, and summary files

Request changes. One issue is still open: the new canonicalize returns a plain path under 260 bytes and a verbatim one at or above it, so a base and a deep descendant stop comparing as prefix and suffix — src/folders.rs:91, with the effect visible at rune-docs/src/support.rs:121 and src/cli/run/workspace.rs:798.

  • Minor: src/cli/state.rs:17 still joins .local/state/rune as one string, so Windows prints mixed separators.
  • Minor: src/folders.rs and rune-docs/src/support.rs carry the same prefix and device-name logic twice; a fix needs both.
    · branch change/rune-runs-on-windows

Comment thread src/folders.rs
}
rest.to_owned()
};
(plain.len() < 260 && plain.split('\\').all(part_reads_as_written)).then_some(plain)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [runeseer] reported by reviewdog 🐶
Medium — canonicalize answers in the plain form only while the result is under 260 bytes and keeps the verbatim \\?\ form otherwise, so a confinement check between a short base and a long descendant compares two spellings of the same file and gives the wrong answer.

  • src/folders.rs:91 The length rule decides the spelling, so one process can hold both forms at once.
  • rune-docs/src/support.rs:121 resolved.starts_with(&resolved_base) then rejects a contained file, and refuse_inside_checkout in src/cli/run/workspace.rs:798 fails to reject one inside the checkout.

@runeseer

runeseer Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Runeseer review — 1 open finding

Risk Finding Location
Medium canonicalize mixes plain and verbatim forms by length, breaking prefix checks src/folders.rs:91

Request changes. One issue is still open: the new canonicalize returns a plain path under 260 bytes and a verbatim one at or above it, so a base and a deep descendant stop comparing as prefix and suffix.

  • Minor: src/cli/state.rs:17 still joins .local/state/rune as one string, so Windows prints mixed separators.
  • Minor: src/folders.rs and rune-docs/src/support.rs carry the same prefix logic twice; a fix needs both.

1 open · Reviewed 8237437d · review run · $2.47 · 4m14s · 35 turns

@runeseer

runeseer Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

@N4M3Z, the following findings block this head:

  • src/folders.rs:91: canonicalize mixes plain and verbatim forms by length, breaking prefix checks

Choose one action:

  • Fix all findings. Then apply review:runeseer to review the new head.
  • Apply ignore:runeseer to accept the complete current verdict.

@abominable-intelligence
abominable-intelligence marked this pull request as ready for review November 19, 2026 01:00
@runeseer

runeseer Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

review/correctness round 2 started on 8237437d at ledger generation 2.

@N4M3Z
N4M3Z merged commit a6befa3 into main Nov 19, 2026
36 of 44 checks passed
@N4M3Z
N4M3Z deleted the change/rune-runs-on-windows branch November 19, 2026 01:01
@runeseer

runeseer Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @abominable-intelligence's task in 1m 18s —— View job


Correctness review

  • Read the ledger and the other lanes' findings (none recorded for this head)
  • Recheck the open finding against HEAD
  • Write the verdict, findings, and summary files

Request changes. HEAD's tree is identical to the previously reviewed 8237437d, so the canonicalize length rule at src/folders.rs:91 is still open: the plain form is returned only under 260 bytes and the verbatim \\?\ form otherwise, so a short base and a long descendant compare as two spellings of one file.

  • No other reviewer recorded a finding on this head.
  • The pull request is already merged, so a fix lands as a follow-up change.
    · branch change/rune-runs-on-windows

@github-actions github-actions Bot added the issue:rune Review lane requires intervention label Nov 19, 2026
@runeseer

runeseer Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Runeseer needs attention — invalid review output

Runeseer received a verdict, but deterministic validation rejected it.

Inspect the validation error. Then request a new review round.

Rerun this workflow only when the pull request head is unchanged. Otherwise, clear issue:rune and request a new round.

Affected head: 8237437d.

Open the failed workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workflows auto: CI and automation under .github issue:rune Review lane requires intervention size:xlarge auto: changed-lines bucket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant